package com.uni.crawl.model.entity.crawl;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.uni.crawl.common.base.UserBaseEntity;
import com.uni.crawl.service.handler.StringTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * <p>
 * 爬虫监控
 * </p>
 *
 * @author JervisPG
 * @since 2024-02-14
 */
@Getter
@Setter
@TableName(value = "crawl_monitor", autoResultMap = true)
@ApiModel(value = "CrawlMonitor对象", description = "爬虫监控")
public class CrawlMonitor extends UserBaseEntity {

    @ApiModelProperty("ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("发送者")
    private String fromUser;

    @ApiModelProperty("接收者")
    private String toUser;

    @ApiModelProperty("监控类型。1-爬虫队列；2-爬虫数据")
    private Byte monitorType;

    @ApiModelProperty("监控关键词")
    private String monitorKeyword;

    @ApiModelProperty("URL MD5")
    @TableField(typeHandler = StringTypeHandler.class)
    private List<String> urlMd5s;

    @ApiModelProperty("通知标题")
    private String notifyTitle;

    @ApiModelProperty("通知内容")
    private String notifyContent;

    @ApiModelProperty("通知状态。-1-通知失败；0-初始化；1-通知中；2-已通知；")
    private Integer notifyStatus;
}
